<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Markmap</title>
<style>
* {
  margin: 0;
  padding: 0;
}
#mindmap {
  display: block;
  width: 100vw;
  height: 100vh;
}
</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/markmap-toolbar@0.14.4/dist/style.css">
</head>
<body>
<svg id="mindmap"></svg>
<script src="https://cdn.jsdelivr.net/npm/d3@6.7.0"></script><script src="https://cdn.jsdelivr.net/npm/markmap-view@0.14.4"></script><script src="https://cdn.jsdelivr.net/npm/markmap-toolbar@0.14.4/dist/index.umd.min.js"></script><script>(r => {
                setTimeout(r);
              })(() => {
  const {
    markmap,
    mm
  } = window;
  const toolbar = new markmap.Toolbar();
  toolbar.attach(mm);
  const el = toolbar.render();
  el.setAttribute('style', 'position:absolute;bottom:20px;right:20px');
  document.body.append(el);
})</script><script>((getMarkmap, getOptions, root, jsonOptions) => {
        const markmap = getMarkmap();
        window.mm = markmap.Markmap.create('svg#mindmap', (getOptions || markmap.deriveOptions)(jsonOptions), root);
      })(() => window.markmap,null,{"type":"heading","depth":0,"payload":{"lines":[0,1]},"content":"方法","children":[{"type":"heading","depth":1,"payload":{"lines":[1,2]},"content":"ES5","children":[{"type":"heading","depth":2,"payload":{"lines":[2,3]},"content":"数组","children":[{"type":"list_item","depth":3,"payload":{"lines":[3,4]},"content":"<code>push()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[4,5]},"content":"在数组末尾添加一个或多个元素，"},{"type":"list_item","depth":4,"payload":{"lines":[5,6]},"content":"参数通常是要添加的元素本身，"},{"type":"list_item","depth":4,"payload":{"lines":[6,7]},"content":"返回新数组的长度，改变原数组。"}]},{"type":"list_item","depth":3,"payload":{"lines":[7,8]},"content":"<code>pop()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[8,9]},"content":"移除并返回数组最后一个元素 ，"},{"type":"list_item","depth":4,"payload":{"lines":[9,10]},"content":"没有参数，"},{"type":"list_item","depth":4,"payload":{"lines":[10,11]},"content":"返回被移除的元素，改变原数组。"}]},{"type":"list_item","depth":3,"payload":{"lines":[11,12]},"content":"<code>shift()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[12,13]},"content":"移除并返回数组第一个元素，"},{"type":"list_item","depth":4,"payload":{"lines":[13,14]},"content":"没有参数，"},{"type":"list_item","depth":4,"payload":{"lines":[14,15]},"content":"返回被移除的元素，改变原数组。"}]},{"type":"list_item","depth":3,"payload":{"lines":[15,16]},"content":"<code>unshift()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[16,17]},"content":"在数组开头添加一个或多个元素，"},{"type":"list_item","depth":4,"payload":{"lines":[17,18]},"content":"参数通常是要添加的元素本身，"},{"type":"list_item","depth":4,"payload":{"lines":[18,19]},"content":"返回新数组的长度，改变原数组。"}]},{"type":"list_item","depth":3,"payload":{"lines":[19,20]},"content":"<code>splice()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[20,21]},"content":"从数组中移除或添加元素，可以实现数组的插入、删除和替换操作;"},{"type":"list_item","depth":4,"payload":{"lines":[21,22]},"content":"参数有三个","children":[{"type":"list_item","depth":5,"payload":{"lines":[22,23]},"content":"index：必需，表示要进行操作的起始位置。"},{"type":"list_item","depth":5,"payload":{"lines":[23,24]},"content":"deleteCount：可选，表示要删除的元素个数，如果为0，则不删除元素。"},{"type":"list_item","depth":5,"payload":{"lines":[24,25]},"content":"item1, item2, ...：可选，要添加到数组中的新元素。"}]},{"type":"list_item","depth":4,"payload":{"lines":[25,26]},"content":"返回被移除的元素组成的新数组，改变原数组。"}]},{"type":"list_item","depth":3,"payload":{"lines":[26,27]},"content":"<code>slice()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[27,28]},"content":"截取数组中指定区段的元素,并返回这个子数组"},{"type":"list_item","depth":4,"payload":{"lines":[28,29]},"content":"参数有两个","children":[{"type":"list_item","depth":5,"payload":{"lines":[29,30]},"content":"第1个参数指定起始下标位置"},{"type":"list_item","depth":5,"payload":{"lines":[30,31]},"content":"第2个参数指定结束位置"},{"type":"list_item","depth":5,"payload":{"lines":[31,32]},"content":"包前不包后"}]},{"type":"list_item","depth":4,"payload":{"lines":[32,33]},"content":"不会改变原本的数组，截取的内容是返还值"}]},{"type":"list_item","depth":3,"payload":{"lines":[33,34]},"content":"<code>concat()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[34,35]},"content":"合并两个或多个数组，"},{"type":"list_item","depth":4,"payload":{"lines":[35,36]},"content":"参数是要连接到原始数组的一个或多个数组。"},{"type":"list_item","depth":4,"payload":{"lines":[36,37]},"content":"返回合并后的新数组，不改变原数组。"}]},{"type":"list_item","depth":3,"payload":{"lines":[37,38]},"content":"<code>join()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[38,39]},"content":"将所有数组元素连接成一个字符串，"},{"type":"list_item","depth":4,"payload":{"lines":[39,40]},"content":"接受一个可选参数，用于指定连接字符串的分隔符。如果没有传入参数，则默认使用逗号作为分隔符。"},{"type":"list_item","depth":4,"payload":{"lines":[40,41]},"content":"返回连接好的字符串，不改变原数组。"}]},{"type":"list_item","depth":3,"payload":{"lines":[41,42]},"content":"<code>reverse()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[42,43]},"content":"能够颠倒数组元素的排列顺序，"},{"type":"list_item","depth":4,"payload":{"lines":[43,44]},"content":"该方法不需要参数"},{"type":"list_item","depth":4,"payload":{"lines":[44,45]},"content":"返回被修改后的新数组，改变原数组"}]},{"type":"list_item","depth":3,"payload":{"lines":[45,46]},"content":"<code>sort()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[46,47]},"content":"能够根据一定条件对数组元素进行排序。"},{"type":"list_item","depth":4,"payload":{"lines":[47,48]},"content":"可以接受一个函数作为参数，该函数定义了排序规则。没有传递参数,则按字母顺序对数组中的元素进行排序。"},{"type":"list_item","depth":4,"payload":{"lines":[48,49]},"content":"返回排序后的新数组，改变原数组。"}]},{"type":"list_item","depth":3,"payload":{"lines":[49,50]},"content":"<code>indexOf() / lastIndexOf()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[50,51]},"content":"使用indexOf和lastIndexOf方法可以检索数组元素，"},{"type":"list_item","depth":4,"payload":{"lines":[51,52]},"content":"数组indexOf方法有一个必需的参数和一个可选的参数："},{"type":"list_item","depth":4,"payload":{"lines":[52,53]},"content":"必需的参数是要查找的数组元素的值；可选的参数是从哪个索引位置开始搜索该元素。如果没有指定该参数，则默认从数组的第一个元素开始搜索。"},{"type":"list_item","depth":4,"payload":{"lines":[53,54]},"content":"返回指定元素的索引位置，如果找不到则返回 -1，不改变原数组。"},{"type":"list_item","depth":4,"payload":{"lines":[54,55]},"content":"lastIndexOf返回指定的值在数组中的最后一个匹配项的索引，用法和indexOf相同。"}]},{"type":"list_item","depth":3,"payload":{"lines":[55,56]},"content":"<code>forEach()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[56,57]},"content":"功能：用来遍历数组中的每个元素，并对每个元素执行相应的操作，该操作由传入的回调函数来定义。"},{"type":"list_item","depth":4,"payload":{"lines":[57,58]},"content":"参数：接收一个回调函数作为参数，回调函数可以接收三个参数：当前处理的元素、当前处理的元素索引和整个数组。其中只有第一个参数是必需的。"},{"type":"list_item","depth":4,"payload":{"lines":[58,59]},"content":"没有返回值、不会改变原数组"}]},{"type":"list_item","depth":3,"payload":{"lines":[59,60]},"content":"<code>map()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[60,61]},"content":"<code>arr.map(function(item,key,arr){})</code>"},{"type":"list_item","depth":4,"payload":{"lines":[61,62]},"content":"使用map方法可以对数组的每个元素调用函数，并返回结果数组。"},{"type":"list_item","depth":4,"payload":{"lines":[62,63]},"content":"它对数组的每个元素都调用函数，并返回结果数组"}]},{"type":"list_item","depth":3,"payload":{"lines":[63,64]},"content":"<code>filter()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[64,65]},"content":"<code>array.filter(function(item,key,arr){ return 条件 })</code>"},{"type":"list_item","depth":4,"payload":{"lines":[65,66]},"content":"使用filter方法可以返回数组中满足指定条件的元素。"},{"type":"list_item","depth":4,"payload":{"lines":[66,67]},"content":"它返回的是所有匹配元素组成的数组，不会改变原数组"}]},{"type":"list_item","depth":3,"payload":{"lines":[67,68]},"content":"<code>reduce()</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[68,69]},"content":"累加的操作"},{"type":"list_item","depth":4,"payload":{"lines":[69,70]},"content":"<code>arr.reduce(fucntion(当前的累加值,键值，键名,原本的数组){},初始值)</code>"},{"type":"list_item","depth":4,"payload":{"lines":[70,71]},"content":"它最终返回值是通过最后一次调用回调函数获得的累加值"}]},{"type":"list_item","depth":3,"payload":{"lines":[71,72]},"content":"<code>every(function (item, key, arr){})</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[72,73]},"content":"如果循环过程中 回调返还的都是true，那么every最终的结果就是true ，否则就是false"},{"type":"list_item","depth":4,"payload":{"lines":[73,74]},"content":"应用于全选/非全选"}]},{"type":"list_item","depth":3,"payload":{"lines":[74,75]},"content":"<code>every(function (item, key, arr){})</code>","children":[{"type":"list_item","depth":4,"payload":{"lines":[75,76]},"content":"如果循环过程中 回调函数里出现一个true，最终结果就是true ,否则就是false"}]}]},{"type":"heading","depth":2,"payload":{"lines":[77,78]},"content":"字符串","children":[{"type":"ordered_list","depth":3,"payload":{"lines":[79,80],"startIndex":1},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[79,80],"index":1},"content":"1. 拼接字符串:"}]},{"type":"bullet_list","depth":3,"payload":{"lines":[80,83]},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[80,81]},"content":"拼接字符串最直观的方式就是使用<code>+</code>拼接,也是最推荐的一种方式"},{"type":"list_item","depth":4,"payload":{"lines":[81,82]},"content":"调用某个字符串的<code>concat</code>方法,可以把concat接受的一个或多个参数拼接在字符串的后边,并返回"}]},{"type":"ordered_list","depth":3,"payload":{"lines":[83,84],"startIndex":2},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[83,84],"index":2},"content":"2. 字符串截取方法:"}]},{"type":"bullet_list","depth":3,"payload":{"lines":[84,101]},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[84,85]},"content":"<code>slice</code>: 截取字符串","children":[{"type":"list_item","depth":5,"payload":{"lines":[85,86]},"content":"接受两个参数,分别代表起始下标和结束下标(不包含结束下标)"},{"type":"list_item","depth":5,"payload":{"lines":[86,87]},"content":"只写一个参数,代表开始截取的起始位置,然后直接截取到末尾"},{"type":"list_item","depth":5,"payload":{"lines":[87,88]},"content":"第一个参数为负,代表从后向前数开始截取的位置,截取还是向后截"},{"type":"list_item","depth":5,"payload":{"lines":[88,89]},"content":"第二个参数为负,代表从后向前数确定结束位置"}]},{"type":"list_item","depth":4,"payload":{"lines":[90,91]},"content":"<code>substring</code>","children":[{"type":"list_item","depth":5,"payload":{"lines":[91,92]},"content":"接受两个参数,分别代表起始下标和结束下标(不包含结束下标)"},{"type":"list_item","depth":5,"payload":{"lines":[92,93]},"content":"只写一个参数,代表开始截取的起始位置,然后直接截取到末尾"},{"type":"list_item","depth":5,"payload":{"lines":[93,94]},"content":"substring会忽略负值,把负值转为0"},{"type":"list_item","depth":5,"payload":{"lines":[94,95]},"content":"如果第二个参数小于第一个参数,则交换两个参数的顺序(起始和结束位置相比较的大小无法确定的时候可以使用substring)"}]},{"type":"list_item","depth":4,"payload":{"lines":[96,97]},"content":"<code>substr</code>(es不太推荐使用)","children":[{"type":"list_item","depth":5,"payload":{"lines":[97,98]},"content":"接受两个参数,分别代表起始下标和截取的长度"},{"type":"list_item","depth":5,"payload":{"lines":[98,99]},"content":"只写一个参数,代表开始截取的起始位置,然后直接截取到末尾"},{"type":"list_item","depth":5,"payload":{"lines":[99,100]},"content":"第一个参数可以书写负值,从字符串的末尾向前数"}]}]},{"type":"ordered_list","depth":3,"payload":{"lines":[101,102],"startIndex":3},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[101,102],"index":3},"content":"3. 字符串大小写转换"}]},{"type":"bullet_list","depth":3,"payload":{"lines":[102,105]},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[102,103]},"content":"<code>toLowerCase()</code>:把字符串中所有的字符转小写"},{"type":"list_item","depth":4,"payload":{"lines":[103,104]},"content":"<code>toUpperCase()</code>:把字符串中所有的字符转大写"}]},{"type":"ordered_list","depth":3,"payload":{"lines":[105,106],"startIndex":4},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[105,106],"index":4},"content":"4. 字符串查找方法:"}]},{"type":"bullet_list","depth":3,"payload":{"lines":[106,115]},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[106,107]},"content":"下标方式(推荐)，直接通过 需计算成员访问运算符([]) 获取某个下标的字符串，如果获取不到，则返回undefined"},{"type":"list_item","depth":4,"payload":{"lines":[107,108]},"content":"<code>charAt方法</code>,字符串的charAt方法可以接受一个 下标 作为参数,获取某个下标的字符串,如果获取不到则返回空字符串"},{"type":"list_item","depth":4,"payload":{"lines":[108,109]},"content":"<code>indexOf方法</code>,接受一个字符串作为参数,判断调用indexOf方法的字符串中是否存在当前字符串参数,如果存在则返回第一次出现的下标,否则返回-1"},{"type":"list_item","depth":4,"payload":{"lines":[109,110]},"content":"<code>lastIndexOf</code>方法,和lastIndex方法一致,只不过是从后向前依次查找,然后返回第一个查找到的下标(下标永远都是从前向后从0开始的)"},{"type":"list_item","depth":4,"payload":{"lines":[110,111]},"content":"<code>search</code>方法和indexOf的功能是相同的，查找指定字符串第一次出现的位置,但是可以接受正则表达式查找,search的底层仍然使用的是indexOf,所以如果不是正则查找,则使用indexOf即可"},{"type":"list_item","depth":4,"payload":{"lines":[111,112]},"content":"<code>macth</code>方法,接受正则表达式作为参数,把所有查找到的字符串,组成一个数组返回,如果一个都查不到,则返回null"},{"type":"list_item","depth":4,"payload":{"lines":[112,113]},"content":"<code>replace</code>方法,用来把查找到的字符串进行替换,接受的第一个参数是正则用来查找被替换的字符串,第二个参数是替换的字符串(第二个参数也可以是一个函数,函数的参数就是当次查找的值,函数的返回值就是当次替换的值)"},{"type":"list_item","depth":4,"payload":{"lines":[113,114]},"content":"<code>includes</code>:如果使用indexOf判断某个字符串是否存在,只能通过判断返回值是否不等于-1实现。includes就是判断某个字符串是否存在,存在返回true,否则返回false"}]},{"type":"ordered_list","depth":3,"payload":{"lines":[115,116],"startIndex":5},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[115,116],"index":5},"content":"5. 字符串转数组方法： <code>split()</code>:"}]},{"type":"bullet_list","depth":3,"payload":{"lines":[116,120]},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[116,117]},"content":"如果没有传递任何参数，或者参数字符串在字符串中不存在，则把字符串整体作为数组的一个值"},{"type":"list_item","depth":4,"payload":{"lines":[117,118]},"content":"如果参数是一个空字符串，则把字符串的每一个字符串作为数组的每一个值"},{"type":"list_item","depth":4,"payload":{"lines":[118,119]},"content":"如果参数是一个字符，则以这个字符为分割，切割字符串"}]},{"type":"ordered_list","depth":3,"payload":{"lines":[120,121],"startIndex":6},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[120,121],"index":6},"content":"6. 去除字符串首尾空白字符"}]},{"type":"bullet_list","depth":3,"payload":{"lines":[121,125]},"content":"","children":[{"type":"list_item","depth":4,"payload":{"lines":[121,122]},"content":"<code>trimStart()</code>:去除字符串前边的空白字符"},{"type":"list_item","depth":4,"payload":{"lines":[122,123]},"content":"<code>trimeEnd()</code>:去除字符串后边空白字符"},{"type":"list_item","depth":4,"payload":{"lines":[123,124]},"content":"<code>trim()</code>:去除字符串两边的空白字符"}]}]}]},{"type":"heading","depth":1,"payload":{"lines":[125,126]},"content":"ES6","children":[{"type":"heading","depth":2,"payload":{"lines":[126,127]},"content":"数组新增","children":[{"type":"list_item","depth":3,"payload":{"lines":[127,128]},"content":"<code>arr.at(i)</code> 方法 : 根据下标获取键值 ，跟<code>arr[i]</code>的区别是i可以为<em>负数</em>","children":[{"type":"list_item","depth":4,"payload":{"lines":[128,129]},"content":"如果 i &gt;= 0，则与 arr[i] 完全相同。"},{"type":"list_item","depth":4,"payload":{"lines":[129,130]},"content":"对于 i 为负数的情况，它则从数组的尾部向前数。"}]},{"type":"list_item","depth":3,"payload":{"lines":[130,131]},"content":"<code>arr.fill( 填充值 , 起始位置 , 结束位置 )</code> 方法 : 使用固定值填充数组，包前不包后"},{"type":"list_item","depth":3,"payload":{"lines":[131,132]},"content":"<code>arr.find()</code> 方法 : 根据条件查找满足条件的第一项内容返还,用法同<code>filter</code>"},{"type":"list_item","depth":3,"payload":{"lines":[132,133]},"content":"<code>arr.findIndex()</code> 方法 : 根据条件查找第一个符合条件的元素索引,用法与find类似"},{"type":"list_item","depth":3,"payload":{"lines":[133,134]},"content":"<code>arr.includes(元素)</code> 方法 : 判断数组中是否包含某个元素，包含返还true 否则返还false"},{"type":"list_item","depth":3,"payload":{"lines":[134,135]},"content":"<code>arr.flat(减低的维度，默认值是1)</code> 方法 : 数组的扁平化"},{"type":"list_item","depth":3,"payload":{"lines":[135,136]},"content":"<code>Array.isArray()</code> 方法 : 判断是否是一个数组"},{"type":"list_item","depth":3,"payload":{"lines":[136,137]},"content":"<code>Array.form()</code> 方法 : 把伪数组转数组"},{"type":"list_item","depth":3,"payload":{"lines":[137,138]},"content":"<code>Array.of()</code> 方法 : 创建一个数组,弥补ES5的不足,可以对单个参数处理"}]},{"type":"heading","depth":2,"payload":{"lines":[139,140]},"content":"对象新增","children":[{"type":"heading","depth":3,"payload":{"lines":[140,141]},"content":"写法","children":[{"type":"list_item","depth":4,"payload":{"lines":[141,142]},"content":"在ES6中，对象的key和value如果相同，则可以简写(省略一个)"},{"type":"list_item","depth":4,"payload":{"lines":[142,143]},"content":"对象里的函数的简写 <code>fn:function(){} ---&gt; fn(){}</code>"},{"type":"list_item","depth":4,"payload":{"lines":[143,144]},"content":"在ES6中，支持key发生变化, 对象里键名解析变量 <code>[key]</code>"}]},{"type":"heading","depth":3,"payload":{"lines":[145,146]},"content":"新增的方法","children":[{"type":"list_item","depth":4,"payload":{"lines":[146,147]},"content":"<code>Object.keys</code> : 获取对象所有的键名 放在数组里；"},{"type":"list_item","depth":4,"payload":{"lines":[147,148]},"content":"<code>Object.values</code> : 获取对象所有键值 放在数组里；"},{"type":"list_item","depth":4,"payload":{"lines":[148,149]},"content":"<code>Object.entries</code> : 获取对象所有 [key, value] 键值 放在数组里"},{"type":"list_item","depth":4,"payload":{"lines":[149,150]},"content":"<code>Object.freeze</code>: 冻结对象"},{"type":"list_item","depth":4,"payload":{"lines":[150,151]},"content":"<code>Object.seal</code>: 把对象变成不可配置对象"},{"type":"list_item","depth":4,"payload":{"lines":[151,152]},"content":"<code>Object.assign</code>: 合并 2个 或者多个对象"},{"type":"list_item","depth":4,"payload":{"lines":[152,153]},"content":"<code>Object.is</code>：判断2个值是否相同(解决ES5留下的bug <code>NAN === NAN</code> <code>true</code>)"},{"type":"list_item","depth":4,"payload":{"lines":[153,154]},"content":"<code>Object.hasOwn( 对象 , 键名 )</code>: 判断某个属性是否是自身属性"}]}]},{"type":"heading","depth":2,"payload":{"lines":[155,156]},"content":"字符串新增","children":[{"type":"list_item","depth":3,"payload":{"lines":[156,157]},"content":"<code>startsWith()</code>方法用来判断当前字符串是否以某个字符串开头，并根据判断结果返回 <code>true</code> 或 <code>false</code>"},{"type":"list_item","depth":3,"payload":{"lines":[157,158]},"content":"<code>endsWith()</code> 方法 : 判断字符串是否以某字符串结尾"},{"type":"list_item","depth":3,"payload":{"lines":[158,159]},"content":"<code>padEnd()</code> 方法会用一个字符串填充当前字符串（如果需要的话则重复填充），返回填充后达到指定长度的字符串。从当前字符串的末尾（右侧）开始填充"},{"type":"list_item","depth":3,"payload":{"lines":[159,160]},"content":"<code>padStart()</code> 方法 : 根据数量补全字符串的开头"},{"type":"list_item","depth":3,"payload":{"lines":[160,161]},"content":"<code>repeat(次数)</code> 方法 : 循环字符串"},{"type":"list_item","depth":3,"payload":{"lines":[161,162]},"content":"<code>includes()</code> 方法 : 判断某个字符 是否存在在某个字符串里"}]},{"type":"heading","depth":2,"payload":{"lines":[163,164]},"content":"新增Math方法","children":[{"type":"list_item","depth":3,"payload":{"lines":[164,165]},"content":"<code>Math.trunc()</code> 方法 : 将数字的小数部分去掉，只保留整数部分"},{"type":"list_item","depth":3,"payload":{"lines":[165,166]},"content":"<code>Math.sign()</code> 方法 : 判断一个数是正数、负数、0或者是NaN"},{"type":"list_item","depth":3,"payload":{"lines":[166,167]},"content":"<code>Math.sqrt()</code> 方法 : 求平方根"},{"type":"list_item","depth":3,"payload":{"lines":[167,168]},"content":"<code>Math.cbrt()</code> 方法 : 求立方根"},{"type":"list_item","depth":3,"payload":{"lines":[168,169]},"content":"<code>Math.hypot()</code> 方法 : 求所有数的平方和的平方根"}]},{"type":"heading","depth":2,"payload":{"lines":[170,171]},"content":"新增number方法","children":[{"type":"list_item","depth":3,"payload":{"lines":[171,172]},"content":"<code>Number.isFinite()</code> 方法 : 判断是否是有限大的数"},{"type":"list_item","depth":3,"payload":{"lines":[172,173]},"content":"<code>Number.isNaN()</code> 方法 : 判断是否是<em>NaN</em>"},{"type":"list_item","depth":3,"payload":{"lines":[173,174]},"content":"<code>Number.isInteger()</code> 方法 : 判断是否是一个整数"},{"type":"list_item","depth":3,"payload":{"lines":[174,175]},"content":"<code>Number.parseInt(str)</code> 方法 : 将字符串转换为对应的数值"}]}]}]},{})</script>
</body>
</html>
